﻿@model MVC01.Models.Product
@{
    ViewBag.Title = "ProductbyCategory";
    Layout = null;
}
<script type="text/javascript">
    $(document).ready(function () {
        $('@(ViewBag.CatSelected)').addClass("active");
    });
     
</script>
<link href="@Url.Content("~/Content/nivo-slider.css")" rel="stylesheet" type="text/css" media="all" />
<div class="products">
    <div class="detail">
        <div class="leftImage">
            <img src="@Url.Content("~/Content/images/" + Model.MainImage)" alt="" />
        </div>
        <div class="rightProperties">
            <h3>
                Tên sản phẩm: @Model.Name
            </h3>
            <h4>
                Mô tả: @Model.Description
            </h4>
            Giá: <strong class="price">@string.Format("{0:0,0}", Model.Price)
                VNĐ</strong>
        </div>
    </div>
    @* <div class="cl">
        &nbsp;</div>
    <ul>
        @{
            int i = 1;
            foreach (var item in Model.ProductImages)
            {
                string clsBreak = (i % 3) == 0 ? "break" : "";

                string imgPath = item.Image.FileName;
                imgPath = @Url.Content("~/Content/images/" + imgPath);
            <li class='@clsBreak'>
                <img src='@imgPath' alt="" height="383px" width="231px" />
                @if (Model.IsPromotion == true)
                {
                    <div class="promotion">
                        <p>
                            -@Model.SaleOffPercent%</p>
                    </div>
                }
            </li>
                i++;
            }
        }
    </ul>
    <div class="cl">
        &nbsp;</div>*@
</div>
